package com.rtx.wms.std.job.cc;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.rtx.api.annotation.RtxJobAnnotation;
import com.rtx.api.quartz.job.BaseJob;
import com.rtx.wms.std.handler.cc.mid.MidCClistHandler;

@Component
@DisallowConcurrentExecution
@RtxJobAnnotation(jobName = "ApiCCListToWmsJob",description = "盘点任务从中间表写入业务表",cron = "0/10 * * * * ?")
public class ApiCCListToWmsJob implements BaseJob {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private MidCClistHandler midCClistHandler;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
    	try {
    		midCClistHandler.handlerMidToWms("ris_edi");
		} catch (Exception e) {
			logger.error("仓库{}出库单从中间表写入WMS异常","wmwhse1",e);
		}
    	
    }
}
